﻿@{
    ViewData["Title"] = "Home Page";
}

<h1>Home</h1>
@if (User.Identity.IsAuthenticated)
{
    <h1>Welcome back @User.Identity.Name</h1>
    <h2>User Claims</h2>
    <dl>
        @foreach (var claim in User.Claims)
        {
            <dt>@claim.Type</dt>
            <dd>@claim.Value</dd>
        }
    </dl>

    var authScheme = "Identity.Application";
    if (!String.IsNullOrWhiteSpace(authScheme))
    {
        <h2>Cookies Properties</h2>
        <dl>
            @{
                var props = (await Context.Authentication.GetAuthenticateInfoAsync(authScheme)).Properties;
            }
            @foreach (var item in props.Items)
            {
                <dt>@item.Key</dt>
                <dd>@item.Value</dd>
            }
        </dl>
    }
}
